<?php
/**
 * Created by PhpStorm.
 * User: Andy
 * Date: 2019/1/14
 * Time: 21:07
 */

namespace App\api\controller;


use Common\controller\Controller;
use Common\services\ActiveMqService;

class ActiveMq  extends Controller
{
    public function index(){

        try {
            $a2="[{
		\"1\": \"1\",
		\"2\": \"2\"
	}, {
		\"3\": \"4\",
		\"5\": \"6\"
	}

]";

            $a1="{
		\"1\": \"1\",
		\"2\": \"2\"
	}";
            $a3="[{
		\"1\": {
			\"1-1\": \"1-2\"
		},
		\"2\": \"2\"
	}, {
		\"3\": \"4\",
		\"5\": \"6\"
	}

]";
            var_dump(json_decode($a1,true));
            var_dump(json_decode($a2,true));
            var_dump(json_decode($a3,true));
            die;

           $res=ActiveMqService::sendToMQ('test2','123',true);
           var_dump($res);
        } catch (StompException $e) {
            die('error: ' . $e->getMessage());
        }


    }

}